{% load i18n %}
{% if cl.search_fields %}
<form id="search" action="" method="get" class="ui-bar">
    <div data-role="fieldcontain">
        <label for="{{ search_var }}">{% trans "Search" %}</label>
        <input type="search" size="40" name="{{ search_var }}" id="searchinput" value="{{ cl.query|escape }}">
        {#<input type="submit" data-role="button" data-theme="b" value="{% trans "Go" %}" data-inset="true">#}
    </div>
    {% for pair in cl.params.items %}{% ifnotequal pair.0 search_var %}
    <input type="hidden" name="{{ pair.0|escape }}" value="{{ pair.1|escape }}"/>
    {% endifnotequal %}{% endfor %}
</form>

{% if show_result_count %}
<a href="?" class="inactive float-left">{% blocktrans with cl.full_result_count as full_result_count %}{{ full_result_count }} total{% endblocktrans %}</a>
{% endif %}

<script type="text/javascript">
(function($){
    $(function(){ $('#searchinput').focus() })
})(jQuery)
</script>
{% endif %}
